Skip to content

Fix smart punctuation inside grammar terminals #1869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jun 22, 2025

Smart punctuation was converting ... to . This fixes it so that it will be escaped to avoid the conversion. This normally doesn't happen inside a backtick code block, but since we are using spans for terminals, pulldown-cmark is accidentally picking them up.

This also includes hyphen to handle en-dash and em-dash, though we don't have those.

Fixes #1867

Smart punctuation was converting `...` to `…`. This fixes it so that it
will be escaped to avoid the conversion. This normally doesn't happen
inside a backtick code block, but since we are using spans for
terminals, pulldown-cmark is accidentally picking them up.

This also includes hyphen to handle en-dash and em-dash, though we don't
have those.

Fixes rust-lang#1867
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jun 22, 2025
@traviscross traviscross added this pull request to the merge queue Jun 24, 2025
Merged via the queue into rust-lang:master with commit fb58c5d Jun 24, 2025
5 checks passed
bors added a commit to rust-lang/rust that referenced this pull request Jun 25, 2025
[beta] update cargo and reference

## cargo

1 commits in 84709f085062cbf3c51fa507527c1b2334015178..c24e1064277fe51ab72011e2612e556ac56addf7
2025-06-22 23:58:39 +0000 to 2025-06-23 13:53:07 -0700
- [Beta-1.89] Fix potential deadlock in `CacheState::lock` (rust-lang/cargo#15699)

### reference

3 commits in 50fc1628f36563958399123829c73755fa7a8421..9571d4d38cc580bd9fe926f97fccd98f215564a9
2025-06-19 02:02:39 +0000 to 2025-06-24 22:32:56 +0000
- Add new temporary lifetime extension rule (rust-lang/reference#1813)
- Fix smart punctuation inside grammar terminals (rust-lang/reference#1869)
- Fix placement of codegen link definitions (rust-lang/reference#1868)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mdBook smart punctuation is harmful to inline code snippets
3 participants